3.44 \(\int (c+d x) (a+b \coth (e+f x))^2 \, dx\)

Optimal. Leaf size=127 \[ \frac{a b d \text{PolyLog}\left (2,e^{2 (e+f x)}\right )}{f^2}+\frac{a^2 (c+d x)^2}{2 d}+\frac{2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac{a b (c+d x)^2}{d}-\frac{b^2 (c+d x) \coth (e+f x)}{f}+b^2 c x+\frac{b^2 d \log (\sinh (e+f x))}{f^2}+\frac{1}{2} b^2 d x^2 \]

[Out]

b^2*c*x + (b^2*d*x^2)/2 + (a^2*(c + d*x)^2)/(2*d) - (a*b*(c + d*x)^2)/d - (b^2*(c + d*x)*Coth[e + f*x])/f + (2
*a*b*(c + d*x)*Log[1 - E^(2*(e + f*x))])/f + (b^2*d*Log[Sinh[e + f*x]])/f^2 + (a*b*d*PolyLog[2, E^(2*(e + f*x)
)])/f^2

________________________________________________________________________________________

Rubi [A]  time = 0.184377, antiderivative size = 127, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.389, Rules used = {3722, 3716, 2190, 2279, 2391, 3720, 3475} \[ \frac{a b d \text{PolyLog}\left (2,e^{2 (e+f x)}\right )}{f^2}+\frac{a^2 (c+d x)^2}{2 d}+\frac{2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}-\frac{a b (c+d x)^2}{d}-\frac{b^2 (c+d x) \coth (e+f x)}{f}+b^2 c x+\frac{b^2 d \log (\sinh (e+f x))}{f^2}+\frac{1}{2} b^2 d x^2 \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*(a + b*Coth[e + f*x])^2,x]

[Out]

b^2*c*x + (b^2*d*x^2)/2 + (a^2*(c + d*x)^2)/(2*d) - (a*b*(c + d*x)^2)/d - (b^2*(c + d*x)*Coth[e + f*x])/f + (2
*a*b*(c + d*x)*Log[1 - E^(2*(e + f*x))])/f + (b^2*d*Log[Sinh[e + f*x]])/f^2 + (a*b*d*PolyLog[2, E^(2*(e + f*x)
)])/f^2

Rule 3722

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 3716

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + Pi*(k_.) + (Complex[0, fz_])*(f_.)*(x_)], x_Symbol] :> -Simp[(I*(c
+ d*x)^(m + 1))/(d*(m + 1)), x] + Dist[2*I, Int[((c + d*x)^m*E^(2*(-(I*e) + f*fz*x)))/(E^(2*I*k*Pi)*(1 + E^(2*
(-(I*e) + f*fz*x))/E^(2*I*k*Pi))), x], x] /; FreeQ[{c, d, e, f, fz}, x] && IntegerQ[4*k] && IGtQ[m, 0]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 3720

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(c + d*x)^m*(b*Tan[e
 + f*x])^(n - 1))/(f*(n - 1)), x] + (-Dist[(b*d*m)/(f*(n - 1)), Int[(c + d*x)^(m - 1)*(b*Tan[e + f*x])^(n - 1)
, x], x] - Dist[b^2, Int[(c + d*x)^m*(b*Tan[e + f*x])^(n - 2), x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n,
1] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (c+d x) (a+b \coth (e+f x))^2 \, dx &=\int \left (a^2 (c+d x)+2 a b (c+d x) \coth (e+f x)+b^2 (c+d x) \coth ^2(e+f x)\right ) \, dx\\ &=\frac{a^2 (c+d x)^2}{2 d}+(2 a b) \int (c+d x) \coth (e+f x) \, dx+b^2 \int (c+d x) \coth ^2(e+f x) \, dx\\ &=\frac{a^2 (c+d x)^2}{2 d}-\frac{a b (c+d x)^2}{d}-\frac{b^2 (c+d x) \coth (e+f x)}{f}-(4 a b) \int \frac{e^{2 (e+f x)} (c+d x)}{1-e^{2 (e+f x)}} \, dx+b^2 \int (c+d x) \, dx+\frac{\left (b^2 d\right ) \int \coth (e+f x) \, dx}{f}\\ &=b^2 c x+\frac{1}{2} b^2 d x^2+\frac{a^2 (c+d x)^2}{2 d}-\frac{a b (c+d x)^2}{d}-\frac{b^2 (c+d x) \coth (e+f x)}{f}+\frac{2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}+\frac{b^2 d \log (\sinh (e+f x))}{f^2}-\frac{(2 a b d) \int \log \left (1-e^{2 (e+f x)}\right ) \, dx}{f}\\ &=b^2 c x+\frac{1}{2} b^2 d x^2+\frac{a^2 (c+d x)^2}{2 d}-\frac{a b (c+d x)^2}{d}-\frac{b^2 (c+d x) \coth (e+f x)}{f}+\frac{2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}+\frac{b^2 d \log (\sinh (e+f x))}{f^2}-\frac{(a b d) \operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{2 (e+f x)}\right )}{f^2}\\ &=b^2 c x+\frac{1}{2} b^2 d x^2+\frac{a^2 (c+d x)^2}{2 d}-\frac{a b (c+d x)^2}{d}-\frac{b^2 (c+d x) \coth (e+f x)}{f}+\frac{2 a b (c+d x) \log \left (1-e^{2 (e+f x)}\right )}{f}+\frac{b^2 d \log (\sinh (e+f x))}{f^2}+\frac{a b d \text{Li}_2\left (e^{2 (e+f x)}\right )}{f^2}\\ \end{align*}

Mathematica [A]  time = 1.89982, size = 192, normalized size = 1.51 \[ \frac{\sinh (e+f x) (a+b \coth (e+f x))^2 \left (-2 a b d \sinh (e+f x) \text{PolyLog}\left (2,e^{-2 (e+f x)}\right )+\sinh (e+f x) \left (-(e+f x) \left (a^2 (-2 c f+d e-d f x)-2 a b d (e+f x)+b^2 (-2 c f+d e-d f x)\right )+2 b \log (\sinh (e+f x)) (2 a c f-2 a d e+b d)+4 a b d (e+f x) \log \left (1-e^{-2 (e+f x)}\right )\right )-2 b^2 f (c+d x) \cosh (e+f x)\right )}{2 f^2 (a \sinh (e+f x)+b \cosh (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*(a + b*Coth[e + f*x])^2,x]

[Out]

((a + b*Coth[e + f*x])^2*Sinh[e + f*x]*(-2*b^2*f*(c + d*x)*Cosh[e + f*x] + (-((e + f*x)*(-2*a*b*d*(e + f*x) +
a^2*(d*e - 2*c*f - d*f*x) + b^2*(d*e - 2*c*f - d*f*x))) + 4*a*b*d*(e + f*x)*Log[1 - E^(-2*(e + f*x))] + 2*b*(b
*d - 2*a*d*e + 2*a*c*f)*Log[Sinh[e + f*x]])*Sinh[e + f*x] - 2*a*b*d*PolyLog[2, E^(-2*(e + f*x))]*Sinh[e + f*x]
))/(2*f^2*(b*Cosh[e + f*x] + a*Sinh[e + f*x])^2)

________________________________________________________________________________________

Maple [B]  time = 0.082, size = 318, normalized size = 2.5 \begin{align*}{\frac{{a}^{2}d{x}^{2}}{2}}-abd{x}^{2}+{\frac{{b}^{2}d{x}^{2}}{2}}+c{a}^{2}x+2\,abcx+{b}^{2}cx-2\,{\frac{{b}^{2} \left ( dx+c \right ) }{f \left ({{\rm e}^{2\,fx+2\,e}}-1 \right ) }}-2\,{\frac{{b}^{2}d\ln \left ({{\rm e}^{fx+e}} \right ) }{{f}^{2}}}+{\frac{{b}^{2}d\ln \left ({{\rm e}^{fx+e}}-1 \right ) }{{f}^{2}}}+{\frac{{b}^{2}d\ln \left ({{\rm e}^{fx+e}}+1 \right ) }{{f}^{2}}}-4\,{\frac{abc\ln \left ({{\rm e}^{fx+e}} \right ) }{f}}+2\,{\frac{abc\ln \left ({{\rm e}^{fx+e}}-1 \right ) }{f}}+2\,{\frac{abc\ln \left ({{\rm e}^{fx+e}}+1 \right ) }{f}}+4\,{\frac{abde\ln \left ({{\rm e}^{fx+e}} \right ) }{{f}^{2}}}-2\,{\frac{abde\ln \left ({{\rm e}^{fx+e}}-1 \right ) }{{f}^{2}}}+2\,{\frac{b\ln \left ({{\rm e}^{fx+e}}+1 \right ) adx}{f}}+2\,{\frac{b\ln \left ( 1-{{\rm e}^{fx+e}} \right ) adx}{f}}+2\,{\frac{b\ln \left ( 1-{{\rm e}^{fx+e}} \right ) ade}{{f}^{2}}}-4\,{\frac{abdex}{f}}-2\,{\frac{abd{e}^{2}}{{f}^{2}}}+2\,{\frac{bda{\it polylog} \left ( 2,{{\rm e}^{fx+e}} \right ) }{{f}^{2}}}+2\,{\frac{bda{\it polylog} \left ( 2,-{{\rm e}^{fx+e}} \right ) }{{f}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*(a+b*coth(f*x+e))^2,x)

[Out]

1/2*a^2*d*x^2-a*b*d*x^2+1/2*b^2*d*x^2+c*a^2*x+2*a*b*c*x+b^2*c*x-2/f*b^2*(d*x+c)/(exp(2*f*x+2*e)-1)-2*b^2/f^2*d
*ln(exp(f*x+e))+b^2/f^2*d*ln(exp(f*x+e)-1)+b^2/f^2*d*ln(exp(f*x+e)+1)-4*b/f*a*c*ln(exp(f*x+e))+2*b/f*a*c*ln(ex
p(f*x+e)-1)+2*b/f*a*c*ln(exp(f*x+e)+1)+4*b/f^2*d*a*e*ln(exp(f*x+e))-2*b/f^2*d*a*e*ln(exp(f*x+e)-1)+2*b/f*ln(ex
p(f*x+e)+1)*a*d*x+2*b/f*ln(1-exp(f*x+e))*a*d*x+2*b/f^2*ln(1-exp(f*x+e))*a*d*e-4*b/f*a*d*e*x-2*b/f^2*a*d*e^2+2*
b/f^2*d*a*polylog(2,exp(f*x+e))+2*b/f^2*d*a*polylog(2,-exp(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.40955, size = 329, normalized size = 2.59 \begin{align*} \frac{1}{2} \, a^{2} d x^{2} - 2 \, a b d x^{2} + a^{2} c x - \frac{2 \, b^{2} d x}{f} + \frac{2 \, a b c \log \left (\sinh \left (f x + e\right )\right )}{f} + \frac{2 \,{\left (f x \log \left (e^{\left (f x + e\right )} + 1\right ) +{\rm Li}_2\left (-e^{\left (f x + e\right )}\right )\right )} a b d}{f^{2}} + \frac{2 \,{\left (f x \log \left (-e^{\left (f x + e\right )} + 1\right ) +{\rm Li}_2\left (e^{\left (f x + e\right )}\right )\right )} a b d}{f^{2}} + \frac{b^{2} d \log \left (e^{\left (f x + e\right )} + 1\right )}{f^{2}} + \frac{b^{2} d \log \left (e^{\left (f x + e\right )} - 1\right )}{f^{2}} - \frac{2 \,{\left (c f + 2 \, d\right )} b^{2} x + 4 \, b^{2} c +{\left (2 \, a b d f + b^{2} d f\right )} x^{2} -{\left (2 \, b^{2} c f x e^{\left (2 \, e\right )} +{\left (2 \, a b d f e^{\left (2 \, e\right )} + b^{2} d f e^{\left (2 \, e\right )}\right )} x^{2}\right )} e^{\left (2 \, f x\right )}}{2 \,{\left (f e^{\left (2 \, f x + 2 \, e\right )} - f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e))^2,x, algorithm="maxima")

[Out]

1/2*a^2*d*x^2 - 2*a*b*d*x^2 + a^2*c*x - 2*b^2*d*x/f + 2*a*b*c*log(sinh(f*x + e))/f + 2*(f*x*log(e^(f*x + e) +
1) + dilog(-e^(f*x + e)))*a*b*d/f^2 + 2*(f*x*log(-e^(f*x + e) + 1) + dilog(e^(f*x + e)))*a*b*d/f^2 + b^2*d*log
(e^(f*x + e) + 1)/f^2 + b^2*d*log(e^(f*x + e) - 1)/f^2 - 1/2*(2*(c*f + 2*d)*b^2*x + 4*b^2*c + (2*a*b*d*f + b^2
*d*f)*x^2 - (2*b^2*c*f*x*e^(2*e) + (2*a*b*d*f*e^(2*e) + b^2*d*f*e^(2*e))*x^2)*e^(2*f*x))/(f*e^(2*f*x + 2*e) -
f)

________________________________________________________________________________________

Fricas [B]  time = 2.67433, size = 2142, normalized size = 16.87 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e))^2,x, algorithm="fricas")

[Out]

-1/2*((a^2 - 2*a*b + b^2)*d*f^2*x^2 + 4*a*b*d*e^2 + 2*(a^2 - 2*a*b + b^2)*c*f^2*x - 4*b^2*d*e - ((a^2 - 2*a*b
+ b^2)*d*f^2*x^2 + 4*a*b*d*e^2 - 8*a*b*c*e*f - 4*b^2*d*e - 2*(2*b^2*d*f - (a^2 - 2*a*b + b^2)*c*f^2)*x)*cosh(f
*x + e)^2 - 2*((a^2 - 2*a*b + b^2)*d*f^2*x^2 + 4*a*b*d*e^2 - 8*a*b*c*e*f - 4*b^2*d*e - 2*(2*b^2*d*f - (a^2 - 2
*a*b + b^2)*c*f^2)*x)*cosh(f*x + e)*sinh(f*x + e) - ((a^2 - 2*a*b + b^2)*d*f^2*x^2 + 4*a*b*d*e^2 - 8*a*b*c*e*f
 - 4*b^2*d*e - 2*(2*b^2*d*f - (a^2 - 2*a*b + b^2)*c*f^2)*x)*sinh(f*x + e)^2 - 4*(2*a*b*c*e - b^2*c)*f - 4*(a*b
*d*cosh(f*x + e)^2 + 2*a*b*d*cosh(f*x + e)*sinh(f*x + e) + a*b*d*sinh(f*x + e)^2 - a*b*d)*dilog(cosh(f*x + e)
+ sinh(f*x + e)) - 4*(a*b*d*cosh(f*x + e)^2 + 2*a*b*d*cosh(f*x + e)*sinh(f*x + e) + a*b*d*sinh(f*x + e)^2 - a*
b*d)*dilog(-cosh(f*x + e) - sinh(f*x + e)) + 2*(2*a*b*d*f*x + 2*a*b*c*f + b^2*d - (2*a*b*d*f*x + 2*a*b*c*f + b
^2*d)*cosh(f*x + e)^2 - 2*(2*a*b*d*f*x + 2*a*b*c*f + b^2*d)*cosh(f*x + e)*sinh(f*x + e) - (2*a*b*d*f*x + 2*a*b
*c*f + b^2*d)*sinh(f*x + e)^2)*log(cosh(f*x + e) + sinh(f*x + e) + 1) - 2*(2*a*b*d*e - 2*a*b*c*f - b^2*d - (2*
a*b*d*e - 2*a*b*c*f - b^2*d)*cosh(f*x + e)^2 - 2*(2*a*b*d*e - 2*a*b*c*f - b^2*d)*cosh(f*x + e)*sinh(f*x + e) -
 (2*a*b*d*e - 2*a*b*c*f - b^2*d)*sinh(f*x + e)^2)*log(cosh(f*x + e) + sinh(f*x + e) - 1) + 4*(a*b*d*f*x + a*b*
d*e - (a*b*d*f*x + a*b*d*e)*cosh(f*x + e)^2 - 2*(a*b*d*f*x + a*b*d*e)*cosh(f*x + e)*sinh(f*x + e) - (a*b*d*f*x
 + a*b*d*e)*sinh(f*x + e)^2)*log(-cosh(f*x + e) - sinh(f*x + e) + 1))/(f^2*cosh(f*x + e)^2 + 2*f^2*cosh(f*x +
e)*sinh(f*x + e) + f^2*sinh(f*x + e)^2 - f^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \coth{\left (e + f x \right )}\right )^{2} \left (c + d x\right )\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e))**2,x)

[Out]

Integral((a + b*coth(e + f*x))**2*(c + d*x), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}{\left (b \coth \left (f x + e\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*(a+b*coth(f*x+e))^2,x, algorithm="giac")

[Out]

integrate((d*x + c)*(b*coth(f*x + e) + a)^2, x)